package com.ruoyi.gas.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.gas.mapper.GasDetectionObjectDictMapper;
import com.ruoyi.gas.domain.GasDetectionObjectDict;
import com.ruoyi.gas.service.IGasDetectionObjectDictService;

/**
 * 检测对象字典Service业务层处理
 *
 * @author ruoyi
 * @date 2023-12-11
 */
@Service
public class GasDetectionObjectDictServiceImpl implements IGasDetectionObjectDictService
{
    @Autowired
    private GasDetectionObjectDictMapper gasDetectionObjectDictMapper;

    /**
     * 查询检测对象字典
     *
     * @param code 检测对象字典主键
     * @return 检测对象字典
     */
    @Override
    public GasDetectionObjectDict selectGasDetectionObjectDictByCode(Long code)
    {
        return gasDetectionObjectDictMapper.selectGasDetectionObjectDictByCode(code);
    }

    /**
     * 查询检测对象字典列表
     *
     * @param gasDetectionObjectDict 检测对象字典
     * @return 检测对象字典
     */
    @Override
    public List<GasDetectionObjectDict> selectGasDetectionObjectDictList(GasDetectionObjectDict gasDetectionObjectDict)
    {
        return gasDetectionObjectDictMapper.selectGasDetectionObjectDictList(gasDetectionObjectDict);
    }

    /**
     * 新增检测对象字典
     *
     * @param gasDetectionObjectDict 检测对象字典
     * @return 结果
     */
    @Override
    public int insertGasDetectionObjectDict(GasDetectionObjectDict gasDetectionObjectDict)
    {
        return gasDetectionObjectDictMapper.insertGasDetectionObjectDict(gasDetectionObjectDict);
    }

    /**
     * 修改检测对象字典
     *
     * @param gasDetectionObjectDict 检测对象字典
     * @return 结果
     */
    @Override
    public int updateGasDetectionObjectDict(GasDetectionObjectDict gasDetectionObjectDict)
    {
        return gasDetectionObjectDictMapper.updateGasDetectionObjectDict(gasDetectionObjectDict);
    }

    /**
     * 批量删除检测对象字典
     *
     * @param codes 需要删除的检测对象字典主键
     * @return 结果
     */
    @Override
    public int deleteGasDetectionObjectDictByCodes(Long[] codes)
    {
        return gasDetectionObjectDictMapper.deleteGasDetectionObjectDictByCodes(codes);
    }

    /**
     * 删除检测对象字典信息
     *
     * @param code 检测对象字典主键
     * @return 结果
     */
    @Override
    public int deleteGasDetectionObjectDictByCode(Long code)
    {
        return gasDetectionObjectDictMapper.deleteGasDetectionObjectDictByCode(code);
    }

    @Override
    public String getNameByCode(Long code) {
        return gasDetectionObjectDictMapper.getNameByCode(code);
    }
}
